import requests
from urllib import parse
url = 'http://login.dgut.edu.cn/eportal/InterFace.do?method=login'
headers = {
    'Host': 'login.dgut.edu.cn',
    'Connection': 'keep-alive',
    'sec-ch-ua-platform': '"Windows"',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0',
    'sec-ch-ua': '"Chromium";v="130", "Microsoft Edge";v="130", "Not?A_Brand";v="99"',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'sec-ch-ua-mobile': '?0',
    'Accept': '*/*',
    'Origin': 'https://login.dgut.edu.cn',
    'Sec-Fetch-Site': 'same-origin',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Dest': 'empty',
    'Referer': 'https://login.dgut.edu.cn/eportal/index.jsp?wlanuserip=巴拉巴拉巴拉&wlanacname=巴拉巴拉巴拉&ssid=&nasip=巴拉巴拉巴拉&snmpagentip=&mac=巴拉巴拉巴拉&t=wireless-v2&url=巴拉巴拉巴拉&apmac=&nasid=巴拉巴拉巴拉&vid=巴拉巴拉巴拉&port=巴拉巴拉巴拉&nasportid=巴拉巴拉巴拉',
    'Accept-Encoding': 'gzip, deflate, br, zstd',
    'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
    'Cookie': 'EPORTAL_COOKIE_OPERATORPWD=; EPORTAL_COOKIE_NEWV=true; EPORTAL_COOKIE_SERVER=; EPORTAL_AUTO_LAND=; EPORTAL_COOKIE_USERNAME=; EPORTAL_COOKIE_PASSWORD=; EPORTAL_COOKIE_SERVER_NAME=; JSESSIONID='
}
data = {
    'userId': '巴拉巴拉巴拉',
    'password': '巴拉巴拉巴拉',
    'service': '',
    'queryString': '巴拉巴拉巴拉',
    'operatorPwd': '',
    'operatorUserId': '',
    'validcode': '',
    'passwordEncrypt': 'true'
}
try:
    response = requests.post(url, headers=headers, data=data)
    print(parse.unquote(response.text.encode('unicode_escape').decode('utf-8').replace('\\x','%')))
except requests.exceptions.RequestException as e:
    print('net work error')